package com.fc.mall.portal.component;

import com.fc.mall.portal.service.CacheService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 *  把所有配置项 sys_property_config 放入Redis 服务缓存中
 * Created by Sunny on 2019/5/24.
 */
@Component
@Order(1)
public class InitializeApplication implements CommandLineRunner {

    @Autowired
    private CacheService cacheService;


    @Override
    public void run(String... strings) throws Exception {
        cacheService.initDictCache();
    }
}
